import request from '@/utils/request';

interface LoginParams {
  username: string;
  password: string;
}

interface UserInfo {
  username: string;
  email: string;
  avatar: string;
}

export const userApi = {
  login: (data: LoginParams) => request.post('/api/login', data),
  getUserInfo: () => request.get<UserInfo>('/api/user/info'),
};
